package com.example.neochevbook;

import java.util.ArrayList;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

public class Afficheappartement extends Activity {

	private ListView lvListe;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_afficheappartement);
		
		Modele vmodele = new Modele();
		vmodele.open();
		final ArrayList<Appartement> malistec = vmodele.listAppartement();
		vmodele.close();
		lvListe = (ListView)findViewById(R.id.lvListe);
		
		AppartementAdapter adapter = new AppartementAdapter(this, malistec);
		lvListe.setAdapter(adapter);
		
		}


	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.afficheappartement, menu);
		return true;
	}

}
